package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "room_focus", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class RoomFocusEntity extends IAcross
{
    public RoomFocusEntity()
    {
        super();
    }

    public RoomFocusEntity(IAcross ia)
    {
        super(ia);
    }

    private int rfId;
    private Integer selfId;
    private Integer targetId;
    private Integer createId;
    private Timestamp createDate;

    @Id
    @Column(name = "rf_id")
    @GeneratedValue
    public int getRfId() {
        return rfId;
    }

    public void setRfId(int rfId) {
        this.rfId = rfId;
    }

    @Basic
    @Column(name = "self_id")
    public Integer getSelfId() {
        return selfId;
    }

    public void setSelfId(Integer selfId) {
        this.selfId = selfId;
    }

    @Basic
    @Column(name = "target_Id")
    public Integer getTargetId() {
        return targetId;
    }

    public void setTargetId(Integer targetId) {
        this.targetId = targetId;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoomFocusEntity that = (RoomFocusEntity) o;

        if (rfId != that.rfId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createId != null ? !createId.equals(that.createId) : that.createId != null) return false;
        if (selfId != null ? !selfId.equals(that.selfId) : that.selfId != null) return false;
        if (targetId != null ? !targetId.equals(that.targetId) : that.targetId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = rfId;
        result = 31 * result + (selfId != null ? selfId.hashCode() : 0);
        result = 31 * result + (targetId != null ? targetId.hashCode() : 0);
        result = 31 * result + (createId != null ? createId.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
}
